package com.example.mvprxjava;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.mvprxjava.base.MainContract;
import com.example.mvprxjava.base.MainPresenter;
import com.example.mvprxjava.bean.User;


public class MainActivity extends AppCompatActivity implements MainContract.View {

    private MainPresenter mPresenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mPresenter = new MainPresenter(this);
        mPresenter.subscribe();
    }

    @Override
    public void showUser(User user) {

    }

    @Override
    public void setPresenter(MainContract.Presenter presenter) {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mPresenter.unSubscribe();
    }
}
